<template>
	<div class='go-top'>
		<span class='left' @click="clickLeft">{{ lText }}</span>
		<span class='right' @click="goTop"><Icon type="arrow-up-c"></Icon>返回顶部</span>
	</div>
</template>

<script>
	import $ from 'jquery'


	export default{
		props: {
			lText: {
				type: String, 
				default: '返回电报版'
			}
		},
		created() {
			
		},
		methods: {
			clickLeft() {
				this.$emit('left')
			},
			goTop() {
				$('.pages').animate({scrollTop: 0})
			}
		}
	}
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
	@import "~@/common/stylus/variable.styl"
	@import "~@/common/stylus/mixin.styl"
	
	::-webkit-scrollbar
		width: 0

	.go-top
		display: flex
		padding: 10px
		margin-top: 50px;
		justify-content: space-between
		font-size: 14px
		color: $mc
		i 
			position: relative
			top: 1px
			margin-right: 4px
			font-size: 16px
</style>